<?php
namespace app\common\validate;

use think\Validate;

class Company extends Validate{

    protected $rule = [
        'company_name'=>'require',
        'province_id'=>'require',
        'city_id'=>'require',
        'district_id'=>'require',
        'mobile'=>'require|regex:\d{11}',
        'password'=>'require',
        'type'=>'require|number|between:2,3'
    ];


    protected $message = [
        'company_name.require'=>'公司名称必填',
        'province_id.require'=>'请选择省份',
        'city_id.require'=>'请选择市',
        'district_id.require'=>'请选择区',
        'mobile.require' =>'手机号码必填',
        'password.require'=>'密码必填',
        'type.require'=>'必须选择类型',
        'type.number'=>'类型错误',
        'type.between'=>'只能选择工厂或者展览馆类型',
    ];

}